﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DelonixRegiaHMSys.Core.Interfaces;
using DelonixRegiaHMSys.Core.Models;

namespace DelonixRegiaHMSys.Core.Services
{
    public class coServices
    {
        private readonly ICheckOutQuery _checkOutQuery;
        public coServices(ICheckOutQuery checkOutQuery)
        {
            _checkOutQuery = checkOutQuery;
        }

        //public IEnumerable<CheckOut> GetAll()
        //{
        //    return _checkOutQuery.GetAll();
        //}

        public void AddCheckOut(CheckOut co)
        {
            _checkOutQuery.AddCheckOut(co);
        }

        public void RetrieveCheckOut(string checkOutID)
        {
            _checkOutQuery.RetrieveCheckOutByID(checkOutID);

        }

        public void InsertInvoice(Invoice inv)
        {
            _checkOutQuery.InsertInvoice(inv);
        }

        public void InsertItem(Item itm)
        {
            _checkOutQuery.InsertItem(itm);
        }

        public IEnumerable<Item> GetItem(string invoiceID)
        {
            return _checkOutQuery.GetItem(invoiceID);
        }
    }
}
